package com.example.scan;

import android.device.ScanDevice;

public class ScanManager {
    private ScanDevice mScanner;
    private boolean mbContinueDecode;
    private boolean mDecode;

    public ScanManager() {
        mScanner = new ScanDevice();
    }

    public void openScan() {
        mScanner.openScan();
    }

    public void closeScan() {
        mScanner.closeScan();
    }

    public void startDecode() {
        mScanner.startScan();
        mDecode = true;
    }

    public void stopDecode() {
        mScanner.stopScan();
        mDecode = false;
    }

    public void startContinuousDecode() {
        mScanner.startContinuousScan();
        mbContinueDecode = true;
    }

    public void stopContinuousDecode() {
        mScanner.stopContinuousScan();
        mbContinueDecode = false;
    }

    public boolean isDecode() {
        return mDecode;
    }

    public boolean isContinuousDecode() {
        return mbContinueDecode;
    }

    public ScanDevice getScanner() {
        return mScanner;
    }
}